home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / outstng.c < prev    next >
Text File  |  1985-06-03  |  2KB  |  37 lines

  1. /********************************************************************
  2.  *  This function will output a string to an asynch port.  The baud *
  3.  *  rate divisors and  word  length  should already  be  set.  HXFD *
  4.  *  should point to the line status register and HXF8 should  point *
  5.  *  to the Transmitting Hold Register before calling this  routine. *
  6.  *  If you are using an IBM PC with comm port #1 then these  values *
  7.  *  should be hex 3fd and 3f8 respectively.  If you are using comm2 *
  8.  *  these valute should be 2fd and 2f8.  I  declare HXFD  and  HXF9 *
  9.  *  globally at the first  part of a  program rather  than  passing *
  10.  *  parms all over the place but the routine could be modified very *
  11.  *  easily to handle it in any manner preferred.                    *
  12.  *                                                                  *
  13.  *  This  routine  will  replace one I  earlier put  in the  public *
  14.  *  called "sethayes.c".  If you want to initialize your Hayes then *
  15.  *  pass this function the setup string and the routine will do  it *
  16.  *  for you.  I don't know when I will be able to bring  the  TULSA *
  17.  *  IBBS C-Sig board back on line so those of you who have used the *
  18.  *  board  please be  patient and  hopefully we will  have it  back *
  19.  *  bigger and better than ever before.                             *
  20.  *                     Lynn Long                                    *
  21.  *                     PO Box 471114                                *
  22.  *                     Tulsa, OK 74147-1114                         *
  23.  ********************************************************************/ 
  24. VOID outstng(outdata)
  25. char *outdata;
  26. {
  27.     unsigned byte = 0x00;
  28.      while(*outdata != '\0'){
  29.         byte=inp(HXFD);
  30.         byte&=0x20;
  31.         if(byte==0x20){
  32.              outp(HXF8,*outdata);
  33.             *outdata++;
  34.         }
  35.           }
  36.  }
  37.